Optimal. Leaf size=29 \[ \frac {\cos \left (a+\frac {b}{x}\right )}{b x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3460, 3377,
2717} \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3377
Rule 3460
Rubi steps
\begin {align*} \int \frac {\sin \left (a+\frac {b}{x}\right )}{x^3} \, dx &=-\text {Subst}\left (\int x \sin (a+b x) \, dx,x,\frac {1}{x}\right )\\ &=\frac {\cos \left (a+\frac {b}{x}\right )}{b x}-\frac {\text {Subst}\left (\int \cos (a+b x) \, dx,x,\frac {1}{x}\right )}{b}\\ &=\frac {\cos \left (a+\frac {b}{x}\right )}{b x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 29, normalized size = 1.00 \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 42, normalized size = 1.45
method | result | size |
risch | \(\frac {\cos \left (\frac {a x +b}{x}\right )}{b x}-\frac {\sin \left (\frac {a x +b}{x}\right )}{b^{2}}\) | \(34\) |
derivativedivides | \(-\frac {\sin \left (a +\frac {b}{x}\right )-\left (a +\frac {b}{x}\right ) \cos \left (a +\frac {b}{x}\right )+a \cos \left (a +\frac {b}{x}\right )}{b^{2}}\) | \(42\) |
default | \(-\frac {\sin \left (a +\frac {b}{x}\right )-\left (a +\frac {b}{x}\right ) \cos \left (a +\frac {b}{x}\right )+a \cos \left (a +\frac {b}{x}\right )}{b^{2}}\) | \(42\) |
norman | \(\frac {\frac {x}{b}-\frac {2 x^{2} \tan \left (\frac {a}{2}+\frac {b}{2 x}\right )}{b^{2}}-\frac {x \left (\tan ^{2}\left (\frac {a}{2}+\frac {b}{2 x}\right )\right )}{b}}{\left (1+\tan ^{2}\left (\frac {a}{2}+\frac {b}{2 x}\right )\right ) x^{2}}\) | \(66\) |
meijerg | \(-\frac {2 \sqrt {\pi }\, \cos \left (a \right ) \left (-\frac {b \cos \left (\frac {b}{x}\right )}{2 \sqrt {\pi }\, x}+\frac {\sin \left (\frac {b}{x}\right )}{2 \sqrt {\pi }}\right )}{b^{2}}-\frac {2 \sqrt {\pi }\, \sin \left (a \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (\frac {b}{x}\right )}{2 \sqrt {\pi }}+\frac {b \sin \left (\frac {b}{x}\right )}{2 \sqrt {\pi }\, x}\right )}{b^{2}}\) | \(81\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.33, size = 50, normalized size = 1.72 \begin {gather*} -\frac {{\left (i \, \Gamma \left (2, \frac {i \, b}{x}\right ) - i \, \Gamma \left (2, -\frac {i \, b}{x}\right )\right )} \cos \left (a\right ) + {\left (\Gamma \left (2, \frac {i \, b}{x}\right ) + \Gamma \left (2, -\frac {i \, b}{x}\right )\right )} \sin \left (a\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 33, normalized size = 1.14 \begin {gather*} \frac {b \cos \left (\frac {a x + b}{x}\right ) - x \sin \left (\frac {a x + b}{x}\right )}{b^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.51, size = 29, normalized size = 1.00 \begin {gather*} \begin {cases} \frac {\cos {\left (a + \frac {b}{x} \right )}}{b x} - \frac {\sin {\left (a + \frac {b}{x} \right )}}{b^{2}} & \text {for}\: b \neq 0 \\- \frac {\sin {\left (a \right )}}{2 x^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.67, size = 48, normalized size = 1.66 \begin {gather*} -\frac {a \cos \left (\frac {a x + b}{x}\right ) - \frac {{\left (a x + b\right )} \cos \left (\frac {a x + b}{x}\right )}{x} + \sin \left (\frac {a x + b}{x}\right )}{b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.54, size = 29, normalized size = 1.00 \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b\,x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________